<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libxlsxwriter: conditional_format2.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libxlsxwriter
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">conditional_format2.c</div>  </div>
</div><!--header-->
<div class="contents">
<table width="600">
<tr>
<td><a class="el" href="conditional_format1_8c-example.html">&lt;&lt; conditional_format1.c</a> </td><td align="right"><a class="el" href="images_8c-example.html">images.c &gt;&gt;</a>  </td></tr>
</table>
<p>A more comprehensive example of how to add conditional formatting to an libxlsxwriter file. Conditional formatting allows you to apply a format to a cell or a range of cells based on certain criteria.</p>
<div class="image">
<img src="conditional_format1.png" alt=""/>
</div>
<div class="fragment"><div class="line"><span class="comment">/*</span></div>
<div class="line"><span class="comment"> * An example of how to add conditional formatting to an libxlsxwriter file.</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> * Conditional formatting allows you to apply a format to a cell or a</span></div>
<div class="line"><span class="comment"> * range of cells based on certain criteria.</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> * Copyright 2014-2020, John McNamara, jmcnamara@cpan.org</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &quot;xlsxwriter.h&quot;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Write some data to the worksheet. */</span></div>
<div class="line"><span class="keywordtype">void</span> write_worksheet_data(<a name="_a0"></a><a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet) {</div>
<div class="line"> </div>
<div class="line">    uint8_t data[10][10] = {</div>
<div class="line">        {34, 72,  38, 30, 75, 48, 75, 66, 84, 86},</div>
<div class="line">        {6,  24,  1,  84, 54, 62, 60, 3, 26,  59},</div>
<div class="line">        {28, 79,  97, 13, 85, 93, 93, 22, 5,  14},</div>
<div class="line">        {27, 71,  40, 17, 18, 79, 90, 93, 29, 47},</div>
<div class="line">        {88, 25,  33, 23, 67, 1,  59, 79, 47, 36},</div>
<div class="line">        {24, 100, 20, 88, 29, 33, 38, 54, 54, 88},</div>
<div class="line">        {6,  57,  88, 28, 10, 26, 37, 7,  41, 48},</div>
<div class="line">        {52, 78,  1,  96, 26, 45, 47, 33, 96, 36},</div>
<div class="line">        {60, 54,  81, 66, 81, 90, 80, 93, 12, 55},</div>
<div class="line">        {70, 5,   46, 14, 71, 19, 66, 36, 41, 21},</div>
<div class="line">    };</div>
<div class="line"> </div>
<div class="line">    <span class="keywordtype">int</span> row, col;</div>
<div class="line">    <span class="keywordflow">for</span> (row = 0; row &lt; 10; row++)</div>
<div class="line">        <span class="keywordflow">for</span> (col = 0; col &lt; 10; col++)</div>
<div class="line">            <a name="a1"></a><a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet, row +2, col +1, data[row][col], NULL);</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Reset the conditional format options back to their initial state. */</span></div>
<div class="line"><span class="keywordtype">void</span> reset_conditional_format(<a name="_a2"></a><a class="code" href="structlxw__conditional__format.html">lxw_conditional_format</a> *conditional_format) {</div>
<div class="line">    memset(conditional_format, 0, <span class="keyword">sizeof</span>(<a class="code" href="structlxw__conditional__format.html">lxw_conditional_format</a>));</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() {</div>
<div class="line"> </div>
<div class="line">    <a name="_a3"></a><a class="code" href="structlxw__workbook.html">lxw_workbook</a>  *workbook   = <a name="a4"></a><a class="code" href="workbook_8h.html#a1cf96608a23ee4eb0e8467c15240d00b">workbook_new</a>(<span class="stringliteral">&quot;conditional_format.xlsx&quot;</span>);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet1 = <a name="a5"></a><a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet2 = <a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet3 = <a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet4 = <a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet5 = <a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet6 = <a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet7 = <a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet8 = <a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet9 = <a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Add a format. Light red fill with dark red text. */</span></div>
<div class="line">    <a name="_a6"></a><a class="code" href="structlxw__format.html">lxw_format</a> *format1 = <a name="a7"></a><a class="code" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a>(workbook);</div>
<div class="line">    <a name="a8"></a><a class="code" href="format_8h.html#aeef47436c335daf1801683ac7b3b587d">format_set_bg_color</a>(format1, 0xFFC7CE);</div>
<div class="line">    <a name="a9"></a><a class="code" href="format_8h.html#a61981b2080bfe6381ede5358ee05b05c">format_set_font_color</a>(format1, 0x9C0006);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Add a format. Green fill with dark green text. */</span></div>
<div class="line">    <a class="code" href="structlxw__format.html">lxw_format</a> *format2 = <a class="code" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a>(workbook);</div>
<div class="line">    <a class="code" href="format_8h.html#aeef47436c335daf1801683ac7b3b587d">format_set_bg_color</a>(format2, 0xC6EFCE);</div>
<div class="line">    <a class="code" href="format_8h.html#a61981b2080bfe6381ede5358ee05b05c">format_set_font_color</a>(format2, 0x006100);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Create a single conditional format object to reuse in the examples. */</span></div>
<div class="line">    <a class="code" href="structlxw__conditional__format.html">lxw_conditional_format</a> *conditional_format = calloc(1, <span class="keyword">sizeof</span>(<a class="code" href="structlxw__conditional__format.html">lxw_conditional_format</a>));</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 1. Conditional formatting based on simple cell based criteria.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line"> </div>
<div class="line">    write_worksheet_data(worksheet1);</div>
<div class="line"> </div>
<div class="line">    <a name="a10"></a><a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet1,</div>
<div class="line">                           <a name="a11"></a><a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Cells with values &gt;= 50 are in light red. &quot;</span></div>
<div class="line">                           <span class="stringliteral">&quot;Values &lt; 50 are in light green.&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a name="a12"></a><a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a name="a13"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a14"></a><a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a name="a15"></a><a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bad288ab1847d59fa1183555c5a82c4d11">LXW_CONDITIONAL_CRITERIA_GREATER_THAN_OR_EQUAL_TO</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a16"></a><a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>    = 50;</div>
<div class="line">    conditional_format-&gt;<a name="a17"></a><a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format1;</div>
<div class="line">    <a name="a18"></a><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet1, <a name="a19"></a><a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a name="a20"></a><a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bae8a15acdb209feb53b8948c0e50cc9c3">LXW_CONDITIONAL_CRITERIA_LESS_THAN</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>    = 50;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format2;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet1, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 2. Conditional formatting based on max and min values.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line"> </div>
<div class="line">    write_worksheet_data(worksheet2);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet2,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Values between 30 and 70 are in light red. &quot;</span></div>
<div class="line">                           <span class="stringliteral">&quot;Values outside that range are in light green.&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>  = <a name="a21"></a><a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94">LXW_CONDITIONAL_CRITERIA_BETWEEN</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a22"></a><a class="code" href="structlxw__conditional__format.html#af8b4013a50ba2a58fa009dc22dcb9db8">min_value</a> = 30;</div>
<div class="line">    conditional_format-&gt;<a name="a23"></a><a class="code" href="structlxw__conditional__format.html#a18ce2238c9d2c51b79e9c9206c892a2c">max_value</a> = 70;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>    = format1;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet2, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>  = <a name="a24"></a><a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba1bf47932d37f00e5585273f0f6759075">LXW_CONDITIONAL_CRITERIA_NOT_BETWEEN</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af8b4013a50ba2a58fa009dc22dcb9db8">min_value</a> = 30;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a18ce2238c9d2c51b79e9c9206c892a2c">max_value</a> = 70;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>    = format2;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet2, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 3. Conditional formatting with duplicate and unique values.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line"> </div>
<div class="line">    write_worksheet_data(worksheet3);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet3,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Duplicate values are in light red. &quot;</span></div>
<div class="line">                           <span class="stringliteral">&quot;Unique values are in light green.&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a name="a25"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da288a6952f520145b6c00e5ad6d273370">LXW_CONDITIONAL_TYPE_DUPLICATE</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>    = format1;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet3, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a name="a26"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da058193bb32dae5557ced4117f57a8182">LXW_CONDITIONAL_TYPE_UNIQUE</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>    = format2;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet3, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 4. Conditional formatting with above and below average values.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line"> </div>
<div class="line">    write_worksheet_data(worksheet4);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet4,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Above average values are in light red. &quot;</span></div>
<div class="line">                           <span class="stringliteral">&quot;Below average values are in light green.&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a name="a27"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dabdae15fb9048bcd6823c8ff02b553548">LXW_CONDITIONAL_TYPE_AVERAGE</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a name="a28"></a><a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba7abe5eb7e05b62e5722ee13ea2820be8">LXW_CONDITIONAL_CRITERIA_AVERAGE_ABOVE</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format1;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet4, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dabdae15fb9048bcd6823c8ff02b553548">LXW_CONDITIONAL_TYPE_AVERAGE</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a name="a29"></a><a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6badc3fe6291eea11883810c9291d3af4d6">LXW_CONDITIONAL_CRITERIA_AVERAGE_BELOW</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format2;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet4, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 5. Conditional formatting with top and bottom values.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line"> </div>
<div class="line">    write_worksheet_data(worksheet5);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet5,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Top 10 values are in light red. &quot;</span></div>
<div class="line">                           <span class="stringliteral">&quot;Bottom 10 values are in light green.&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a name="a30"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da0d7cc55cbacac31182eef8bb16b69ab6">LXW_CONDITIONAL_TYPE_TOP</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>    = 10;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format1;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet5, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a name="a31"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da2da918db0a1930d2e8f818e14424d824">LXW_CONDITIONAL_TYPE_BOTTOM</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>    = 10;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format2;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet5, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 6. Conditional formatting with multiple ranges.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line"> </div>
<div class="line">    write_worksheet_data(worksheet6);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet6,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Cells with values &gt;= 50 are in light red.&quot;</span></div>
<div class="line">                           <span class="stringliteral">&quot;Values &lt; 50 are in light green. Non-contiguous ranges.&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>        = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>    = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bad288ab1847d59fa1183555c5a82c4d11">LXW_CONDITIONAL_CRITERIA_GREATER_THAN_OR_EQUAL_TO</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>       = 50;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>      = format1;</div>
<div class="line">    conditional_format-&gt;<a name="a32"></a><a class="code" href="structlxw__conditional__format.html#a3fed811ec39cfda41a3c4db3135f1841">multi_range</a> = <span class="stringliteral">&quot;B3:K6 B9:K12&quot;</span>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet6, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>        = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>    = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bae8a15acdb209feb53b8948c0e50cc9c3">LXW_CONDITIONAL_CRITERIA_LESS_THAN</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>       = 50;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>      = format2;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3fed811ec39cfda41a3c4db3135f1841">multi_range</a> = <span class="stringliteral">&quot;B3:K6 B9:K12&quot;</span>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet6, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Reset the options before the next example. */</span></div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 7. Conditional formatting with 2 color scales.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Write the worksheet data. */</span></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= 12; i++) {</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet7, i + 1, 1, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet7, i + 1, 3, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet7, i + 1, 6, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet7, i + 1, 8, i, NULL);</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet7,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Examples of color scales with default and user colors.&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet7, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B2&quot;</span>), <span class="stringliteral">&quot;2 Color Scale&quot;</span>,               NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet7, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;D2&quot;</span>), <span class="stringliteral">&quot;2 Color Scale + user colors&quot;</span>, NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet7, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;G2&quot;</span>), <span class="stringliteral">&quot;3 Color Scale&quot;</span>,               NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet7, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;I2&quot;</span>), <span class="stringliteral">&quot;3 Color Scale + user colors&quot;</span>, NULL);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* 2 color scale with standard colors. */</span></div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a name="a33"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8">LXW_CONDITIONAL_2_COLOR_SCALE</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet7, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:B14&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* 2 color scale with user defined colors. */</span></div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8">LXW_CONDITIONAL_2_COLOR_SCALE</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a34"></a><a class="code" href="structlxw__conditional__format.html#ab800fddf49071afb1ce9f020d44b2b3c">min_color</a> = 0xFF0000;</div>
<div class="line">    conditional_format-&gt;<a name="a35"></a><a class="code" href="structlxw__conditional__format.html#a6d4a5eb20238f46f2fc594f1a5e1bc33">max_color</a> = 0x00FF00;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet7, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;D3:D14&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Reset the colors before the next example. */</span></div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* 3 color scale with standard colors. */</span></div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a name="a36"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da95e1b05b230b8964f78d676d0b114ed2">LXW_CONDITIONAL_3_COLOR_SCALE</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet7, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;G3:G14&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* 3 color scale with user defined colors. */</span></div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da95e1b05b230b8964f78d676d0b114ed2">LXW_CONDITIONAL_3_COLOR_SCALE</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ab800fddf49071afb1ce9f020d44b2b3c">min_color</a> = 0xC5D9F1;</div>
<div class="line">    conditional_format-&gt;<a name="a37"></a><a class="code" href="structlxw__conditional__format.html#af81689ba9f4c8a89b1e32f62054136ad">mid_color</a> = 0x8DB4E3;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a6d4a5eb20238f46f2fc594f1a5e1bc33">max_color</a> = 0x538ED5;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet7, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;I3:I14&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 8. Conditional formatting with data bars.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Write the worksheet data. */</span></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= 12; i++) {</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet8, i + 1, 1, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet8, i + 1, 3, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet8, i + 1, 5, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet8, i + 1, 7, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet8, i + 1, 9, i, NULL);</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <span class="keywordtype">int</span> data[] = {-1, -2, -3, -2, -1, 0, 1, 2, 3, 2, 1, 0};</div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= 12; i++) {</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet8, i + 1, 11, data[i -1], NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet8, i + 1, 13, data[i -1], NULL);</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet8,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Examples of data bars.&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet8, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B2&quot;</span>), <span class="stringliteral">&quot;Default data bars&quot;</span>,         NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet8, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;D2&quot;</span>), <span class="stringliteral">&quot;Bars only&quot;</span>,                 NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet8, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;F2&quot;</span>), <span class="stringliteral">&quot;With user color&quot;</span>,           NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet8, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;H2&quot;</span>), <span class="stringliteral">&quot;Solid bars&quot;</span>,                NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet8, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;J2&quot;</span>), <span class="stringliteral">&quot;Right to left&quot;</span>,             NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet8, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;L2&quot;</span>), <span class="stringliteral">&quot;Excel 2010 style&quot;</span>,          NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet8, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;N2&quot;</span>), <span class="stringliteral">&quot;Negative same as positive&quot;</span>, NULL);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a name="a38"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet8, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:B14&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a39"></a><a class="code" href="structlxw__conditional__format.html#a208a4c91723db5794041d1b488992619">bar_only</a>      = <a name="a40"></a><a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet8, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;D3:D14&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a41"></a><a class="code" href="structlxw__conditional__format.html#ad2dc53f2c1668c926452a27b41fcb640">bar_color</a>     = 0x63C384;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet8, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;F3:F14&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a42"></a><a class="code" href="structlxw__conditional__format.html#a7f3f95a74f02ab316c38db46b0b8499c">bar_solid</a>     = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet8, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;H3:H14&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a43"></a><a class="code" href="structlxw__conditional__format.html#a8b249e7f9e9f4849013e1879d9629eb1">bar_direction</a> = <a name="a44"></a><a class="code" href="worksheet_8h.html#a3d18ac39694d2ee9256b17e74d1f9168a1aa9036eda34cd072c021b8a391fcf1a">LXW_CONDITIONAL_BAR_DIRECTION_RIGHT_TO_LEFT</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet8, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;J3:J14&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a45"></a><a class="code" href="structlxw__conditional__format.html#a407c47249bff85bdc92f25502daea813">data_bar_2010</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet8, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;L3:L14&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>                           = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a46"></a><a class="code" href="structlxw__conditional__format.html#aa78aa5551b20f92d1d80efc00939005c">bar_negative_color_same</a>        = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a47"></a><a class="code" href="structlxw__conditional__format.html#ad053eb830063113c9893c04a0a7b4ef4">bar_negative_border_color_same</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet8, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;N3:N14&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 9. Conditional formatting with icon sets.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Write the worksheet data. */</span></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= 3; i++) {</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet9, 2, i, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet9, 3, i, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet9, 4, i, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet9, 5, i, i, NULL);</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= 4; i++) {</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet9, 6, i, i, NULL);</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= 5; i++) {</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet9, 7, i, i, NULL);</div>
<div class="line">        <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet9, 8, i, i, NULL);</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet9,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Examples of conditional formats with icon sets.&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a name="a48"></a><a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a49"></a><a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a>    = <a name="a50"></a><a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca">LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet9, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:D3&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a>    = <a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca">LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a51"></a><a class="code" href="structlxw__conditional__format.html#aac7b01a937ca3203030ddbe8d34d54de">reverse_icons</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet9, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B4:D4&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a>    = <a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca">LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</a>;</div>
<div class="line">    conditional_format-&gt;<a name="a52"></a><a class="code" href="structlxw__conditional__format.html#ae7dce71531b0b265f88577b008368d96">icons_only</a>    = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet9, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B5:D5&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a>    = <a name="a53"></a><a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba2a85edc11a29e1ed4ef360b758c4fa58">LXW_CONDITIONAL_ICONS_3_ARROWS_COLORED</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet9, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B6:D6&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a>    = <a name="a54"></a><a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba0f081e87021b94c85c5f513bee20cefc">LXW_CONDITIONAL_ICONS_4_ARROWS_COLORED</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet9, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B7:E7&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a>    = <a name="a55"></a><a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba20cf7c4a18ecd5aa81b5f1e3887d3c3f">LXW_CONDITIONAL_ICONS_5_ARROWS_COLORED</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet9, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B8:F8&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">    conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a>    = <a name="a56"></a><a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840baf492caa7c54d3c2303666083bba40662">LXW_CONDITIONAL_ICONS_5_RATINGS</a>;</div>
<div class="line">    <a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet9, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B9:F9&quot;</span>), conditional_format);</div>
<div class="line">    reset_conditional_format(conditional_format);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    free(conditional_format);</div>
<div class="line">    <span class="keywordflow">return</span> <a name="a57"></a><a class="code" href="workbook_8h.html#ad9e7aeebc0fd43562db5bcd527b2ee5e">workbook_close</a>(workbook);</div>
<div class="line">}</div>
</div><!-- fragment --> </div><!-- contents -->
<div class="ttc" id="astructlxw__conditional__format_html_ad053eb830063113c9893c04a0a7b4ef4"><div class="ttname"><a href="structlxw__conditional__format.html#ad053eb830063113c9893c04a0a7b4ef4">lxw_conditional_format::bar_negative_border_color_same</a></div><div class="ttdeci">uint8_t bar_negative_border_color_same</div><div class="ttdef"><b>Definition:</b> worksheet.h:1131</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_af8b4013a50ba2a58fa009dc22dcb9db8"><div class="ttname"><a href="structlxw__conditional__format.html#af8b4013a50ba2a58fa009dc22dcb9db8">lxw_conditional_format::min_value</a></div><div class="ttdeci">double min_value</div><div class="ttdef"><b>Definition:</b> worksheet.h:1038</div></div>
<div class="ttc" id="aworkbook_8h_html_ad9e7aeebc0fd43562db5bcd527b2ee5e"><div class="ttname"><a href="workbook_8h.html#ad9e7aeebc0fd43562db5bcd527b2ee5e">workbook_close</a></div><div class="ttdeci">lxw_error workbook_close(lxw_workbook *workbook)</div><div class="ttdoc">Close the Workbook object and write the XLSX file.</div></div>
<div class="ttc" id="astructlxw__conditional__format_html"><div class="ttname"><a href="structlxw__conditional__format.html">lxw_conditional_format</a></div><div class="ttdoc">Worksheet conditional formatting options.</div><div class="ttdef"><b>Definition:</b> worksheet.h:998</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a3d3ca3432272ee4d5172349ae030dfcc"><div class="ttname"><a href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">lxw_conditional_format::format</a></div><div class="ttdeci">lxw_format * format</div><div class="ttdef"><b>Definition:</b> worksheet.h:1034</div></div>
<div class="ttc" id="aworksheet_8h_html_aaeb0374167b23080c63eccac2a64840baf492caa7c54d3c2303666083bba40662"><div class="ttname"><a href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840baf492caa7c54d3c2303666083bba40662">LXW_CONDITIONAL_ICONS_5_RATINGS</a></div><div class="ttdeci">@ LXW_CONDITIONAL_ICONS_5_RATINGS</div><div class="ttdef"><b>Definition:</b> worksheet.h:527</div></div>
<div class="ttc" id="aworkbook_8h_html_a1cf96608a23ee4eb0e8467c15240d00b"><div class="ttname"><a href="workbook_8h.html#a1cf96608a23ee4eb0e8467c15240d00b">workbook_new</a></div><div class="ttdeci">lxw_workbook * workbook_new(const char *filename)</div><div class="ttdoc">Create a new workbook object.</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da288a6952f520145b6c00e5ad6d273370"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da288a6952f520145b6c00e5ad6d273370">LXW_CONDITIONAL_TYPE_DUPLICATE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_DUPLICATE</div><div class="ttdef"><b>Definition:</b> worksheet.h:246</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6bad288ab1847d59fa1183555c5a82c4d11"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bad288ab1847d59fa1183555c5a82c4d11">LXW_CONDITIONAL_CRITERIA_GREATER_THAN_OR_EQUAL_TO</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_GREATER_THAN_OR_EQUAL_TO</div><div class="ttdef"><b>Definition:</b> worksheet.h:314</div></div>
<div class="ttc" id="aworksheet_8h_html_a3d18ac39694d2ee9256b17e74d1f9168a1aa9036eda34cd072c021b8a391fcf1a"><div class="ttname"><a href="worksheet_8h.html#a3d18ac39694d2ee9256b17e74d1f9168a1aa9036eda34cd072c021b8a391fcf1a">LXW_CONDITIONAL_BAR_DIRECTION_RIGHT_TO_LEFT</a></div><div class="ttdeci">@ LXW_CONDITIONAL_BAR_DIRECTION_RIGHT_TO_LEFT</div><div class="ttdef"><b>Definition:</b> worksheet.h:446</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6badc3fe6291eea11883810c9291d3af4d6"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6badc3fe6291eea11883810c9291d3af4d6">LXW_CONDITIONAL_CRITERIA_AVERAGE_BELOW</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_AVERAGE_BELOW</div><div class="ttdef"><b>Definition:</b> worksheet.h:371</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dabdae15fb9048bcd6823c8ff02b553548"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dabdae15fb9048bcd6823c8ff02b553548">LXW_CONDITIONAL_TYPE_AVERAGE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_AVERAGE</div><div class="ttdef"><b>Definition:</b> worksheet.h:243</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a8b249e7f9e9f4849013e1879d9629eb1"><div class="ttname"><a href="structlxw__conditional__format.html#a8b249e7f9e9f4849013e1879d9629eb1">lxw_conditional_format::bar_direction</a></div><div class="ttdeci">uint8_t bar_direction</div><div class="ttdef"><b>Definition:</b> worksheet.h:1142</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_af81689ba9f4c8a89b1e32f62054136ad"><div class="ttname"><a href="structlxw__conditional__format.html#af81689ba9f4c8a89b1e32f62054136ad">lxw_conditional_format::mid_color</a></div><div class="ttdeci">lxw_color_t mid_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1068</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a407c47249bff85bdc92f25502daea813"><div class="ttname"><a href="structlxw__conditional__format.html#a407c47249bff85bdc92f25502daea813">lxw_conditional_format::data_bar_2010</a></div><div class="ttdeci">uint8_t data_bar_2010</div><div class="ttdef"><b>Definition:</b> worksheet.h:1102</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da0d7cc55cbacac31182eef8bb16b69ab6"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da0d7cc55cbacac31182eef8bb16b69ab6">LXW_CONDITIONAL_TYPE_TOP</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_TOP</div><div class="ttdef"><b>Definition:</b> worksheet.h:253</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ad184e6a2d11120c042c22e181b15a348"><div class="ttname"><a href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">lxw_conditional_format::type</a></div><div class="ttdeci">uint8_t type</div><div class="ttdef"><b>Definition:</b> worksheet.h:1003</div></div>
<div class="ttc" id="astructlxw__worksheet_html"><div class="ttname"><a href="structlxw__worksheet.html">lxw_worksheet</a></div><div class="ttdoc">Struct to represent an Excel worksheet.</div><div class="ttdef"><b>Definition:</b> worksheet.h:1603</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba1bf47932d37f00e5585273f0f6759075"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba1bf47932d37f00e5585273f0f6759075">LXW_CONDITIONAL_CRITERIA_NOT_BETWEEN</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_NOT_BETWEEN</div><div class="ttdef"><b>Definition:</b> worksheet.h:323</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da058193bb32dae5557ced4117f57a8182"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da058193bb32dae5557ced4117f57a8182">LXW_CONDITIONAL_TYPE_UNIQUE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_UNIQUE</div><div class="ttdef"><b>Definition:</b> worksheet.h:249</div></div>
<div class="ttc" id="astructlxw__format_html"><div class="ttname"><a href="structlxw__format.html">lxw_format</a></div><div class="ttdoc">Struct to represent the formatting properties of an Excel format.</div><div class="ttdef"><b>Definition:</b> format.h:358</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_ICON_SETS</div><div class="ttdef"><b>Definition:</b> worksheet.h:289</div></div>
<div class="ttc" id="autility_8h_html_a4dbbdfc9b616195c799dee78e727cecc"><div class="ttname"><a href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a></div><div class="ttdeci">#define RANGE(range)</div><div class="ttdoc">Convert an Excel A1:B2 range into a (first_row, first_col, last_row, last_col) sequence.</div><div class="ttdef"><b>Definition:</b> utility.h:82</div></div>
<div class="ttc" id="acommon_8h_html_a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf"><div class="ttname"><a href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a></div><div class="ttdeci">@ LXW_TRUE</div><div class="ttdef"><b>Definition:</b> common.h:53</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a208a4c91723db5794041d1b488992619"><div class="ttname"><a href="structlxw__conditional__format.html#a208a4c91723db5794041d1b488992619">lxw_conditional_format::bar_only</a></div><div class="ttdeci">uint8_t bar_only</div><div class="ttdef"><b>Definition:</b> worksheet.h:1094</div></div>
<div class="ttc" id="aformat_8h_html_aeef47436c335daf1801683ac7b3b587d"><div class="ttname"><a href="format_8h.html#aeef47436c335daf1801683ac7b3b587d">format_set_bg_color</a></div><div class="ttdeci">void format_set_bg_color(lxw_format *format, lxw_color_t color)</div><div class="ttdoc">Set the pattern background color for a cell.</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_aa78aa5551b20f92d1d80efc00939005c"><div class="ttname"><a href="structlxw__conditional__format.html#aa78aa5551b20f92d1d80efc00939005c">lxw_conditional_format::bar_negative_color_same</a></div><div class="ttdeci">uint8_t bar_negative_color_same</div><div class="ttdef"><b>Definition:</b> worksheet.h:1125</div></div>
<div class="ttc" id="aworksheet_8h_html_aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca"><div class="ttname"><a href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca">LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</a></div><div class="ttdeci">@ LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</div><div class="ttdef"><b>Definition:</b> worksheet.h:486</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94">LXW_CONDITIONAL_CRITERIA_BETWEEN</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_BETWEEN</div><div class="ttdef"><b>Definition:</b> worksheet.h:320</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ae7dce71531b0b265f88577b008368d96"><div class="ttname"><a href="structlxw__conditional__format.html#ae7dce71531b0b265f88577b008368d96">lxw_conditional_format::icons_only</a></div><div class="ttdeci">uint8_t icons_only</div><div class="ttdef"><b>Definition:</b> worksheet.h:1167</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ab800fddf49071afb1ce9f020d44b2b3c"><div class="ttname"><a href="structlxw__conditional__format.html#ab800fddf49071afb1ce9f020d44b2b3c">lxw_conditional_format::min_color</a></div><div class="ttdeci">lxw_color_t min_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1051</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_CELL</div><div class="ttdef"><b>Definition:</b> worksheet.h:231</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a7f3f95a74f02ab316c38db46b0b8499c"><div class="ttname"><a href="structlxw__conditional__format.html#a7f3f95a74f02ab316c38db46b0b8499c">lxw_conditional_format::bar_solid</a></div><div class="ttdeci">uint8_t bar_solid</div><div class="ttdef"><b>Definition:</b> worksheet.h:1106</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a></div><div class="ttdeci">@ LXW_CONDITIONAL_DATA_BAR</div><div class="ttdef"><b>Definition:</b> worksheet.h:285</div></div>
<div class="ttc" id="aworksheet_8h_html_aaeb0374167b23080c63eccac2a64840ba20cf7c4a18ecd5aa81b5f1e3887d3c3f"><div class="ttname"><a href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba20cf7c4a18ecd5aa81b5f1e3887d3c3f">LXW_CONDITIONAL_ICONS_5_ARROWS_COLORED</a></div><div class="ttdeci">@ LXW_CONDITIONAL_ICONS_5_ARROWS_COLORED</div><div class="ttdef"><b>Definition:</b> worksheet.h:520</div></div>
<div class="ttc" id="astructlxw__workbook_html"><div class="ttname"><a href="structlxw__workbook.html">lxw_workbook</a></div><div class="ttdoc">Struct to represent an Excel workbook.</div><div class="ttdef"><b>Definition:</b> workbook.h:273</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a3fed811ec39cfda41a3c4db3135f1841"><div class="ttname"><a href="structlxw__conditional__format.html#a3fed811ec39cfda41a3c4db3135f1841">lxw_conditional_format::multi_range</a></div><div class="ttdeci">char * multi_range</div><div class="ttdef"><b>Definition:</b> worksheet.h:1183</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ad2dc53f2c1668c926452a27b41fcb640"><div class="ttname"><a href="structlxw__conditional__format.html#ad2dc53f2c1668c926452a27b41fcb640">lxw_conditional_format::bar_color</a></div><div class="ttdeci">lxw_color_t bar_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1090</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a06fc7b5549574bac769cf93ae7180e3f"><div class="ttname"><a href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">lxw_conditional_format::criteria</a></div><div class="ttdeci">uint8_t criteria</div><div class="ttdef"><b>Definition:</b> worksheet.h:1011</div></div>
<div class="ttc" id="aworksheet_8h_html_aaeb0374167b23080c63eccac2a64840ba2a85edc11a29e1ed4ef360b758c4fa58"><div class="ttname"><a href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba2a85edc11a29e1ed4ef360b758c4fa58">LXW_CONDITIONAL_ICONS_3_ARROWS_COLORED</a></div><div class="ttdeci">@ LXW_CONDITIONAL_ICONS_3_ARROWS_COLORED</div><div class="ttdef"><b>Definition:</b> worksheet.h:477</div></div>
<div class="ttc" id="aworksheet_8h_html_ac208046e7a6d12cc87982422efa41b31"><div class="ttname"><a href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a></div><div class="ttdeci">lxw_error worksheet_write_string(lxw_worksheet *worksheet, lxw_row_t row, lxw_col_t col, const char *string, lxw_format *format)</div><div class="ttdoc">Write a string to a worksheet cell.</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_aac7b01a937ca3203030ddbe8d34d54de"><div class="ttname"><a href="structlxw__conditional__format.html#aac7b01a937ca3203030ddbe8d34d54de">lxw_conditional_format::reverse_icons</a></div><div class="ttdeci">uint8_t reverse_icons</div><div class="ttdef"><b>Definition:</b> worksheet.h:1163</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a0cf9351bf7eb8bdfddb988ca9c24f308"><div class="ttname"><a href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">lxw_conditional_format::icon_style</a></div><div class="ttdeci">uint8_t icon_style</div><div class="ttdef"><b>Definition:</b> worksheet.h:1159</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_aa11acc4f64d532fafc7cda9a98dc1fc9"><div class="ttname"><a href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">lxw_conditional_format::value</a></div><div class="ttdeci">double value</div><div class="ttdef"><b>Definition:</b> worksheet.h:1015</div></div>
<div class="ttc" id="aworksheet_8h_html_ad9fc47d3beaa2ab4759414e8580c2289"><div class="ttname"><a href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a></div><div class="ttdeci">lxw_error worksheet_write_number(lxw_worksheet *worksheet, lxw_row_t row, lxw_col_t col, double number, lxw_format *format)</div><div class="ttdoc">Write a number to a worksheet cell.</div></div>
<div class="ttc" id="aformat_8h_html_a61981b2080bfe6381ede5358ee05b05c"><div class="ttname"><a href="format_8h.html#a61981b2080bfe6381ede5358ee05b05c">format_set_font_color</a></div><div class="ttdeci">void format_set_font_color(lxw_format *format, lxw_color_t color)</div><div class="ttdoc">Set the color of the font used in the cell.</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba7abe5eb7e05b62e5722ee13ea2820be8"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba7abe5eb7e05b62e5722ee13ea2820be8">LXW_CONDITIONAL_CRITERIA_AVERAGE_ABOVE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_AVERAGE_ABOVE</div><div class="ttdef"><b>Definition:</b> worksheet.h:368</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6bae8a15acdb209feb53b8948c0e50cc9c3"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bae8a15acdb209feb53b8948c0e50cc9c3">LXW_CONDITIONAL_CRITERIA_LESS_THAN</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_LESS_THAN</div><div class="ttdef"><b>Definition:</b> worksheet.h:311</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a18ce2238c9d2c51b79e9c9206c892a2c"><div class="ttname"><a href="structlxw__conditional__format.html#a18ce2238c9d2c51b79e9c9206c892a2c">lxw_conditional_format::max_value</a></div><div class="ttdeci">double max_value</div><div class="ttdef"><b>Definition:</b> worksheet.h:1073</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a6d4a5eb20238f46f2fc594f1a5e1bc33"><div class="ttname"><a href="structlxw__conditional__format.html#a6d4a5eb20238f46f2fc594f1a5e1bc33">lxw_conditional_format::max_color</a></div><div class="ttdeci">lxw_color_t max_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1086</div></div>
<div class="ttc" id="aworksheet_8h_html_aef79f21eefbda49cd04e338d958c8a95"><div class="ttname"><a href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a></div><div class="ttdeci">lxw_error worksheet_conditional_format_range(lxw_worksheet *worksheet, lxw_row_t first_row, lxw_col_t first_col, lxw_row_t last_row, lxw_col_t last_col, lxw_conditional_format *conditional_format)</div><div class="ttdoc">Add a conditional format to a worksheet range.</div></div>
<div class="ttc" id="autility_8h_html_ad510ac6df573d23203374e24dba373d2"><div class="ttname"><a href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a></div><div class="ttdeci">#define CELL(cell)</div><div class="ttdoc">Convert an Excel A1 cell string into a (row, col) pair.</div><div class="ttdef"><b>Definition:</b> utility.h:45</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da2da918db0a1930d2e8f818e14424d824"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da2da918db0a1930d2e8f818e14424d824">LXW_CONDITIONAL_TYPE_BOTTOM</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_BOTTOM</div><div class="ttdef"><b>Definition:</b> worksheet.h:257</div></div>
<div class="ttc" id="aworkbook_8h_html_a81d456b4f65a464e78e4a0030ecc3c2e"><div class="ttname"><a href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a></div><div class="ttdeci">lxw_worksheet * workbook_add_worksheet(lxw_workbook *workbook, const char *sheetname)</div><div class="ttdoc">Add a new worksheet to a workbook.</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da95e1b05b230b8964f78d676d0b114ed2"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da95e1b05b230b8964f78d676d0b114ed2">LXW_CONDITIONAL_3_COLOR_SCALE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_3_COLOR_SCALE</div><div class="ttdef"><b>Definition:</b> worksheet.h:281</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8">LXW_CONDITIONAL_2_COLOR_SCALE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_2_COLOR_SCALE</div><div class="ttdef"><b>Definition:</b> worksheet.h:277</div></div>
<div class="ttc" id="aworksheet_8h_html_aaeb0374167b23080c63eccac2a64840ba0f081e87021b94c85c5f513bee20cefc"><div class="ttname"><a href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba0f081e87021b94c85c5f513bee20cefc">LXW_CONDITIONAL_ICONS_4_ARROWS_COLORED</a></div><div class="ttdeci">@ LXW_CONDITIONAL_ICONS_4_ARROWS_COLORED</div><div class="ttdef"><b>Definition:</b> worksheet.h:503</div></div>
<div class="ttc" id="aworkbook_8h_html_a279a5d7075d09a3931aae9782afede33"><div class="ttname"><a href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a></div><div class="ttdeci">lxw_format * workbook_add_format(lxw_workbook *workbook)</div><div class="ttdoc">Create a new Format object to formats cells in worksheets.</div></div>
<!-- HTML footer for doxygen 1.8.20-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Copyright 2014-2020 John McNamara.
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
